package com.ying.user.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * JWT 配置
 */
@ConfigurationProperties(prefix = "jwt.config")
public class JwtConfig {
    /**
     * jwt 加密 key，默认值：lihuaming.
     */
    private String key = "lihuaming";

    /**
     * jwt 过期时间，默认值：600000 {@code 10 分钟}.
     */
    private Long ttl = 600000L;

    /**
     * 开启 记住我 之后 jwt 过期时间，默认值 604800000 {@code 7 天}
     */
    private Long remember = 604800000L;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Long getTtl() {
        return ttl;
    }

    public void setTtl(Long ttl) {
        this.ttl = ttl;
    }

    public Long getRemember() {
        return remember;
    }

    public void setRemember(Long remember) {
        this.remember = remember;
    }
}
